package com.xy.annotaion.handler.api.controller;

import lombok.Data;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Dell
 */
@Controller
public class TestController2 {

    /**
     * 返回字符串 被 ViewNameMethodReturnValueHandler抢先
     * 返回对象 才行
     */

    @RequestMapping("/test2")
    public String test2() {
        return "hello test2";
    }

    @RequestMapping("/test3")
    public Test3A test3() {
        Test3A a = new Test3A();
        a.a = "ABC";
        a.b = "XYZ";
        return a;
    }

    @Data
    public static class Test3A {
        private String a;
        private String b;
    }

}
